package com.shop.storage.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.shop.storage.mapper.WmsSupplierMapper;
import com.shop.storage.domain.WmsSupplier;
import com.shop.storage.service.IWmsSupplierService;

/**
 * 供应商Service业务层处理
 * 
 * @author shop
 * @date 2024-06-24
 */
@Service
public class WmsSupplierServiceImpl implements IWmsSupplierService 
{
    @Autowired
    private WmsSupplierMapper wmsSupplierMapper;

    /**
     * 查询供应商
     * 
     * @param supplierId 供应商主键
     * @return 供应商
     */
    @Override
    public List<WmsSupplier>  selectWmsSupplierBySupplierId(Long supplierId)
    {
        return wmsSupplierMapper.selectWmsSupplierBySupplierId(supplierId);
    }

    /**
     * 查询供应商列表
     * 
     * @param wmsSupplier 供应商
     * @return 供应商
     */
    @Override
    public List<WmsSupplier> selectWmsSupplierList(WmsSupplier wmsSupplier)
    {
        return wmsSupplierMapper.selectWmsSupplierList(wmsSupplier);
    }

    /**
     * 新增供应商
     * 
     * @param wmsSupplier 供应商
     * @return 结果
     */
    @Override
    public int insertWmsSupplier(WmsSupplier wmsSupplier)
    {
        return wmsSupplierMapper.insertWmsSupplier(wmsSupplier);
    }

    /**
     * 修改供应商
     * 
     * @param wmsSupplier 供应商
     * @return 结果
     */
    @Override
    public int updateWmsSupplier(WmsSupplier wmsSupplier)
    {
        return wmsSupplierMapper.updateWmsSupplier(wmsSupplier);
    }

    /**
     * 批量删除供应商
     * 
     * @param supplierIds 需要删除的供应商主键
     * @return 结果
     */
    @Override
    public int deleteWmsSupplierBySupplierIds(Long[] supplierIds)
    {
        return wmsSupplierMapper.deleteWmsSupplierBySupplierIds(supplierIds);
    }

    /**
     * 删除供应商信息
     * 
     * @param supplierId 供应商主键
     * @return 结果
     */
    @Override
    public int deleteWmsSupplierBySupplierId(Long supplierId)
    {
        return wmsSupplierMapper.deleteWmsSupplierBySupplierId(supplierId);
    }
}
